package com.vegetable.modules.entity.finance;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 采购/代办付款
 * </p>
 *
 * @author wangruijie
 * @since 2024-04-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="PaymentPurchaseDetail对象", description="采购/代办付款")
public class PaymentPurchaseDetail extends BaseEntity {


    @ApiModelProperty(value = "采购收款id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long mainId;

    @ApiModelProperty(value = "订单id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderId;

    @ApiModelProperty(value = "订单详情id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long detailId;

    @ApiModelProperty(value = "商品名拼接")
    private String commodityNames;

    @ApiModelProperty(value = "订单时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date orderTime;

    @ApiModelProperty(value = "单号")
    private String docNo;

    @ApiModelProperty(value = "金额")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private BigDecimal money;

    @ApiModelProperty(value = "折扣")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private BigDecimal discount;

    @ApiModelProperty(value = "备注")
    private String remark;
}
